package com.pearadmin.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pearadmin.common.nucleus.base.BaseModel;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import java.util.List;

@Data
@Alias("SysPower")
@TableName("sys_power")
public class SysPower extends BaseModel {

    /** 权限编号 */
    @TableId(value = "id",type = IdType.ID_WORKER_STR)
    private String id;
    /** 权限名称 */
    @TableField("name")
    private String name;
    /** 权限标识 */
    @TableField("icon")
    private String icon;
    @TableField("code")
    private String code;
    /** 权限路径 */
    @TableField("url")
    private String url;
    /** 权限类型 */
    @TableField("type")
    private String type;
    /** 父级编号 */
    @TableField("parent_id")
    private String parentId;
    /**权限排序*/
    @TableField("sort")
    private Integer sort;
    @TableField(exist = false)
    private String checkArr = "0";
    /**可用状态*/
    @TableField("status")
    private String status;
    @TableField("description")
    private String description;
    /**权限嵌套*/
    @TableField(exist = false)
    public List<SysPower> children;
}
